/*
 * Copyright (C) 2020 The LINN Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.juqimiao.linn.interception;

/**
 * 拦截器器接口。
 *
 * 通常需要继承它构建用于特定方面的拦截器识别接口。
 * 如：{@link com.juqimiao.linn.command.CommandInterceptorI}。实现这个接口的类
 * 仅用于拦截CommandExecutor.execute方法。
 * 同理，也可以创建不同的拦截器识别用于拦截不同用途的拦截器。
 * 所有拦截器识别器接口通过全局配置自动生效，参见{@link InterceptorRegistry}中的说明。
 *
 * @author  Collin Cai
 */
public interface InterceptorI {
    /**
     * 拦截器执行的次序，数值越大越排在后面。
     * @return 排序值。
     */
    default int getOrder() {
        return 0;
    }
}
